﻿using System;
using System.Diagnostics;
using System.Net.Sockets;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using HslCommunication.BasicFramework;
using HslCommunication.Core;
using HslCommunication.Core.Net;
using HslCommunication.LogNet;
using HslCommunication.Reflection;

namespace HslCommunication.Robot.YASKAWA
{
	/// <summary>
	/// 安川机器人的Ethernet 服务器功能的通讯类<br />
	/// Yaskawa robot's Ethernet server features a communication class
	/// </summary>
	// Token: 0x0200002C RID: 44
	public class YRC1000TcpNet : NetworkDoubleBase, IRobotNet
	{
		/// <summary>
		/// 指定机器人的ip地址及端口号来实例化对象<br />
		/// Specify the robot's IP address and port number to instantiate the object
		/// </summary>
		/// <param name="ipAddress">Ip地址</param>
		/// <param name="port">端口号</param>
		// Token: 0x06000323 RID: 803 RVA: 0x0000C54F File Offset: 0x0000A74F
		public YRC1000TcpNet(string ipAddress, int port)
		{
			this.IpAddress = ipAddress;
			this.Port = port;
			base.ByteTransform = new ReverseWordTransform();
		}

		/// <inheritdoc cref="M:HslCommunication.Core.Net.IRobotNet.Read(System.String)" />
		// Token: 0x06000324 RID: 804 RVA: 0x0000C578 File Offset: 0x0000A778
		[HslMqttApi(ApiTopic = "ReadRobotByte", Description = "Read the robot's original byte data information according to the address")]
		public OperateResult<byte[]> Read(string address)
		{
			OperateResult<string> operateResult = this.ReadString(address);
			bool flag = !operateResult.IsSuccess;
			OperateResult<byte[]> result;
			if (flag)
			{
				result = OperateResult.CreateFailedResult<byte[]>(operateResult);
			}
			else
			{
				result = OperateResult.CreateSuccessResult<byte[]>(Encoding.ASCII.GetBytes(operateResult.Content));
			}
			return result;
		}

		/// <inheritdoc cref="M:HslCommunication.Core.Net.IRobotNet.ReadString(System.String)" />
		// Token: 0x06000325 RID: 805 RVA: 0x0000C5C0 File Offset: 0x0000A7C0
		[HslMqttApi(ApiTopic = "ReadRobotString", Description = "Read the string data information of the robot based on the address")]
		public OperateResult<string> ReadString(string address)
		{
			bool flag = address.IndexOf('.') >= 0 || address.IndexOf(':') >= 0 || address.IndexOf(';') >= 0;
			OperateResult<string> result;
			if (flag)
			{
				string[] array = address.Split(new char[]
				{
					'.',
					':',
					';'
				});
				result = this.ReadByCommand(array[0], array[1]);
			}
			else
			{
				result = this.ReadByCommand(address, null);
			}
			return result;
		}

		/// <inheritdoc cref="M:HslCommunication.Core.Net.IRobotNet.Write(System.String,System.Byte[])" />
		// Token: 0x06000326 RID: 806 RVA: 0x0000C62E File Offset: 0x0000A82E
		[HslMqttApi(ApiTopic = "WriteRobotByte", Description = "According to the address, to write the device related bytes data")]
		public OperateResult Write(string address, byte[] value)
		{
			return this.Write(address, Encoding.ASCII.GetString(value));
		}

		/// <inheritdoc cref="M:HslCommunication.Core.Net.IRobotNet.Write(System.String,System.String)" />
		// Token: 0x06000327 RID: 807 RVA: 0x0000C642 File Offset: 0x0000A842
		[HslMqttApi(ApiTopic = "WriteRobotString", Description = "According to the address, to write the device related string data")]
		public OperateResult Write(string address, string value)
		{
			return this.ReadByCommand(address, value);
		}

		/// <inheritdoc cref="M:HslCommunication.Core.Net.IRobotNet.ReadAsync(System.String)" />
		// Token: 0x06000328 RID: 808 RVA: 0x0000C64C File Offset: 0x0000A84C
		[DebuggerStepThrough]
		public Task<OperateResult<byte[]>> ReadAsync(string address)
		{
			YRC1000TcpNet.<ReadAsync>d__5 <ReadAsync>d__ = new YRC1000TcpNet.<ReadAsync>d__5();
			<ReadAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult<byte[]>>.Create();
			<ReadAsync>d__.<>4__this = this;
			<ReadAsync>d__.address = address;
			<ReadAsync>d__.<>1__state = -1;
			<ReadAsync>d__.<>t__builder.Start<YRC1000TcpNet.<ReadAsync>d__5>(ref <ReadAsync>d__);
			return <ReadAsync>d__.<>t__builder.Task;
		}

		/// <inheritdoc cref="M:HslCommunication.Core.Net.IRobotNet.ReadStringAsync(System.String)" />
		// Token: 0x06000329 RID: 809 RVA: 0x0000C698 File Offset: 0x0000A898
		[DebuggerStepThrough]
		public Task<OperateResult<string>> ReadStringAsync(string address)
		{
			YRC1000TcpNet.<ReadStringAsync>d__6 <ReadStringAsync>d__ = new YRC1000TcpNet.<ReadStringAsync>d__6();
			<ReadStringAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult<string>>.Create();
			<ReadStringAsync>d__.<>4__this = this;
			<ReadStringAsync>d__.address = address;
			<ReadStringAsync>d__.<>1__state = -1;
			<ReadStringAsync>d__.<>t__builder.Start<YRC1000TcpNet.<ReadStringAsync>d__6>(ref <ReadStringAsync>d__);
			return <ReadStringAsync>d__.<>t__builder.Task;
		}

		/// <inheritdoc cref="M:HslCommunication.Core.Net.IRobotNet.WriteAsync(System.String,System.Byte[])" />
		// Token: 0x0600032A RID: 810 RVA: 0x0000C6E4 File Offset: 0x0000A8E4
		[DebuggerStepThrough]
		public Task<OperateResult> WriteAsync(string address, byte[] value)
		{
			YRC1000TcpNet.<WriteAsync>d__7 <WriteAsync>d__ = new YRC1000TcpNet.<WriteAsync>d__7();
			<WriteAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult>.Create();
			<WriteAsync>d__.<>4__this = this;
			<WriteAsync>d__.address = address;
			<WriteAsync>d__.value = value;
			<WriteAsync>d__.<>1__state = -1;
			<WriteAsync>d__.<>t__builder.Start<YRC1000TcpNet.<WriteAsync>d__7>(ref <WriteAsync>d__);
			return <WriteAsync>d__.<>t__builder.Task;
		}

		/// <inheritdoc cref="M:HslCommunication.Core.Net.IRobotNet.WriteAsync(System.String,System.String)" />
		// Token: 0x0600032B RID: 811 RVA: 0x0000C738 File Offset: 0x0000A938
		[DebuggerStepThrough]
		public Task<OperateResult> WriteAsync(string address, string value)
		{
			YRC1000TcpNet.<WriteAsync>d__8 <WriteAsync>d__ = new YRC1000TcpNet.<WriteAsync>d__8();
			<WriteAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult>.Create();
			<WriteAsync>d__.<>4__this = this;
			<WriteAsync>d__.address = address;
			<WriteAsync>d__.value = value;
			<WriteAsync>d__.<>1__state = -1;
			<WriteAsync>d__.<>t__builder.Start<YRC1000TcpNet.<WriteAsync>d__8>(ref <WriteAsync>d__);
			return <WriteAsync>d__.<>t__builder.Task;
		}

		/// <summary>
		/// before read data , the connection should be Initialized
		/// </summary>
		/// <param name="socket">connected socket</param>
		/// <returns>whether is the Initialization is success.</returns>
		// Token: 0x0600032C RID: 812 RVA: 0x0000C78C File Offset: 0x0000A98C
		protected override OperateResult InitializationOnConnect(Socket socket)
		{
			OperateResult<string> operateResult = this.ReadFromCoreServer(socket, "CONNECT Robot_access KeepAlive:-1\r\n");
			bool flag = !operateResult.IsSuccess;
			OperateResult result;
			if (flag)
			{
				result = operateResult;
			}
			else
			{
				bool flag2 = operateResult.Content == "OK:YR Information Server(Ver) Keep-Alive:-1.\r\n";
				if (flag2)
				{
					result = OperateResult.CreateSuccessResult();
				}
				else
				{
					bool flag3 = !operateResult.Content.StartsWith("OK:");
					if (flag3)
					{
						result = new OperateResult(operateResult.Content);
					}
					else
					{
						this.isPersistentConn = false;
						result = OperateResult.CreateSuccessResult();
					}
				}
			}
			return result;
		}

		/// <summary>
		/// before read data , the connection should be Initialized
		/// </summary>
		/// <param name="socket">connected socket</param>
		/// <returns>whether is the Initialization is success.</returns>
		// Token: 0x0600032D RID: 813 RVA: 0x0000C80C File Offset: 0x0000AA0C
		[DebuggerStepThrough]
		protected override Task<OperateResult> InitializationOnConnectAsync(Socket socket)
		{
			YRC1000TcpNet.<InitializationOnConnectAsync>d__10 <InitializationOnConnectAsync>d__ = new YRC1000TcpNet.<InitializationOnConnectAsync>d__10();
			<InitializationOnConnectAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult>.Create();
			<InitializationOnConnectAsync>d__.<>4__this = this;
			<InitializationOnConnectAsync>d__.socket = socket;
			<InitializationOnConnectAsync>d__.<>1__state = -1;
			<InitializationOnConnectAsync>d__.<>t__builder.Start<YRC1000TcpNet.<InitializationOnConnectAsync>d__10>(ref <InitializationOnConnectAsync>d__);
			return <InitializationOnConnectAsync>d__.<>t__builder.Task;
		}

		/// <inheritdoc />
		// Token: 0x0600032E RID: 814 RVA: 0x0000C858 File Offset: 0x0000AA58
		public override OperateResult<byte[]> ReadFromCoreServer(Socket socket, byte[] send, bool hasResponseData = true, bool usePackHeader = true)
		{
			ILogNet logNet = base.LogNet;
			if (logNet != null)
			{
				logNet.WriteDebug(this.ToString(), StringResources.Language.Send + " : " + SoftBasic.ByteToHexString(send, ' '));
			}
			OperateResult operateResult = base.Send(socket, send);
			bool flag = !operateResult.IsSuccess;
			OperateResult<byte[]> result;
			if (flag)
			{
				if (socket != null)
				{
					socket.Close();
				}
				result = OperateResult.CreateFailedResult<byte[]>(operateResult);
			}
			else
			{
				bool flag2 = base.ReceiveTimeOut < 0;
				if (flag2)
				{
					result = OperateResult.CreateSuccessResult<byte[]>(new byte[0]);
				}
				else
				{
					OperateResult<byte[]> operateResult2 = base.ReceiveCommandLineFromSocket(socket, 13, 10, base.ReceiveTimeOut);
					bool flag3 = !operateResult2.IsSuccess;
					if (flag3)
					{
						result = new OperateResult<byte[]>(StringResources.Language.ReceiveDataTimeout + base.ReceiveTimeOut.ToString());
					}
					else
					{
						ILogNet logNet2 = base.LogNet;
						if (logNet2 != null)
						{
							logNet2.WriteDebug(this.ToString(), StringResources.Language.Receive + " : " + SoftBasic.ByteToHexString(operateResult2.Content, ' '));
						}
						result = OperateResult.CreateSuccessResult<byte[]>(operateResult2.Content);
					}
				}
			}
			return result;
		}

		/// <summary>
		/// Read string value from socket
		/// </summary>
		/// <param name="socket">connected socket</param>
		/// <param name="send">string value</param>
		/// <returns>received string value with is successfully</returns>
		// Token: 0x0600032F RID: 815 RVA: 0x0000C978 File Offset: 0x0000AB78
		protected OperateResult<string> ReadFromCoreServer(Socket socket, string send)
		{
			OperateResult<byte[]> operateResult = this.ReadFromCoreServer(socket, Encoding.Default.GetBytes(send), true, true);
			bool flag = !operateResult.IsSuccess;
			OperateResult<string> result;
			if (flag)
			{
				result = OperateResult.CreateFailedResult<string>(operateResult);
			}
			else
			{
				result = OperateResult.CreateSuccessResult<string>(Encoding.Default.GetString(operateResult.Content));
			}
			return result;
		}

		/// <summary>
		/// 根据指令来读取设备的信息，如果命令数据为空，则传入null即可，注意，所有的命令不带换行符<br />
		/// Read the device information according to the instructions. If the command data is empty, pass in null. Note that all commands do not have a newline character
		/// </summary>
		/// <param name="command">命令的内容</param>
		/// <param name="commandData">命令数据内容</param>
		/// <returns>最终的结果内容，需要对IsSuccess进行验证</returns>
		// Token: 0x06000330 RID: 816 RVA: 0x0000C9CC File Offset: 0x0000ABCC
		[HslMqttApi(Description = "Read the device information according to the instructions. If the command data is empty, pass in null. Note that all commands do not have a newline character")]
		public OperateResult<string> ReadByCommand(string command, string commandData)
		{
			this.InteractiveLock.Enter();
			OperateResult<Socket> availableSocket = base.GetAvailableSocket();
			bool flag = !availableSocket.IsSuccess;
			OperateResult<string> result;
			if (flag)
			{
				this.IsSocketError = true;
				AlienSession alienSession = base.AlienSession;
				if (alienSession != null)
				{
					alienSession.Offline();
				}
				this.InteractiveLock.Leave();
				result = OperateResult.CreateFailedResult<string>(availableSocket);
			}
			else
			{
				string send = string.IsNullOrEmpty(commandData) ? ("HOSTCTRL_REQUEST " + command + " 0\r\n") : string.Format("HOSTCTRL_REQUEST {0} {1}\r\n", command, commandData.Length + 1);
				OperateResult<string> operateResult = this.ReadFromCoreServer(availableSocket.Content, send);
				bool flag2 = !operateResult.IsSuccess;
				if (flag2)
				{
					this.IsSocketError = true;
					AlienSession alienSession2 = base.AlienSession;
					if (alienSession2 != null)
					{
						alienSession2.Offline();
					}
					this.InteractiveLock.Leave();
					result = OperateResult.CreateFailedResult<string>(operateResult);
				}
				else
				{
					bool flag3 = !operateResult.Content.StartsWith("OK:");
					if (flag3)
					{
						bool flag4 = !this.isPersistentConn;
						if (flag4)
						{
							Socket content = availableSocket.Content;
							if (content != null)
							{
								content.Close();
							}
						}
						this.InteractiveLock.Leave();
						result = new OperateResult<string>(operateResult.Content.Remove(operateResult.Content.Length - 2));
					}
					else
					{
						bool flag5 = !string.IsNullOrEmpty(commandData);
						if (flag5)
						{
							byte[] bytes = Encoding.ASCII.GetBytes(commandData + "\r");
							ILogNet logNet = base.LogNet;
							if (logNet != null)
							{
								logNet.WriteDebug(this.ToString(), StringResources.Language.Send + " : " + SoftBasic.ByteToHexString(bytes, ' '));
							}
							OperateResult operateResult2 = base.Send(availableSocket.Content, bytes);
							bool flag6 = !operateResult2.IsSuccess;
							if (flag6)
							{
								Socket content2 = availableSocket.Content;
								if (content2 != null)
								{
									content2.Close();
								}
								this.IsSocketError = true;
								AlienSession alienSession3 = base.AlienSession;
								if (alienSession3 != null)
								{
									alienSession3.Offline();
								}
								this.InteractiveLock.Leave();
								return OperateResult.CreateFailedResult<string>(operateResult2);
							}
						}
						OperateResult<byte[]> operateResult3 = base.ReceiveCommandLineFromSocket(availableSocket.Content, 13, base.ReceiveTimeOut);
						bool flag7 = !operateResult3.IsSuccess;
						if (flag7)
						{
							this.IsSocketError = true;
							AlienSession alienSession4 = base.AlienSession;
							if (alienSession4 != null)
							{
								alienSession4.Offline();
							}
							this.InteractiveLock.Leave();
							result = OperateResult.CreateFailedResult<string>(operateResult3);
						}
						else
						{
							string @string = Encoding.ASCII.GetString(operateResult3.Content);
							bool flag8 = @string.StartsWith("ERROR:");
							if (flag8)
							{
								bool flag9 = !this.isPersistentConn;
								if (flag9)
								{
									Socket content3 = availableSocket.Content;
									if (content3 != null)
									{
										content3.Close();
									}
								}
								this.InteractiveLock.Leave();
								base.Receive(availableSocket.Content, 1, 60000, null);
								result = new OperateResult<string>(@string);
							}
							else
							{
								bool flag10 = @string.StartsWith("0000\r");
								if (flag10)
								{
									bool flag11 = !this.isPersistentConn;
									if (flag11)
									{
										Socket content4 = availableSocket.Content;
										if (content4 != null)
										{
											content4.Close();
										}
									}
									base.Receive(availableSocket.Content, 1, 60000, null);
									this.InteractiveLock.Leave();
									result = OperateResult.CreateSuccessResult<string>("0000");
								}
								else
								{
									bool flag12 = !this.isPersistentConn;
									if (flag12)
									{
										Socket content5 = availableSocket.Content;
										if (content5 != null)
										{
											content5.Close();
										}
									}
									this.InteractiveLock.Leave();
									result = OperateResult.CreateSuccessResult<string>(@string.Remove(@string.Length - 1));
								}
							}
						}
					}
				}
			}
			return result;
		}

		/// <inheritdoc />
		// Token: 0x06000331 RID: 817 RVA: 0x0000CD5C File Offset: 0x0000AF5C
		[DebuggerStepThrough]
		public override Task<OperateResult<byte[]>> ReadFromCoreServerAsync(Socket socket, byte[] send, bool hasResponseData = true, bool usePackHeader = true)
		{
			YRC1000TcpNet.<ReadFromCoreServerAsync>d__14 <ReadFromCoreServerAsync>d__ = new YRC1000TcpNet.<ReadFromCoreServerAsync>d__14();
			<ReadFromCoreServerAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult<byte[]>>.Create();
			<ReadFromCoreServerAsync>d__.<>4__this = this;
			<ReadFromCoreServerAsync>d__.socket = socket;
			<ReadFromCoreServerAsync>d__.send = send;
			<ReadFromCoreServerAsync>d__.hasResponseData = hasResponseData;
			<ReadFromCoreServerAsync>d__.usePackHeader = usePackHeader;
			<ReadFromCoreServerAsync>d__.<>1__state = -1;
			<ReadFromCoreServerAsync>d__.<>t__builder.Start<YRC1000TcpNet.<ReadFromCoreServerAsync>d__14>(ref <ReadFromCoreServerAsync>d__);
			return <ReadFromCoreServerAsync>d__.<>t__builder.Task;
		}

		/// <inheritdoc cref="M:HslCommunication.Robot.YASKAWA.YRC1000TcpNet.ReadFromCoreServer(System.Net.Sockets.Socket,System.String)" />
		// Token: 0x06000332 RID: 818 RVA: 0x0000CDC0 File Offset: 0x0000AFC0
		[DebuggerStepThrough]
		protected Task<OperateResult<string>> ReadFromCoreServerAsync(Socket socket, string send)
		{
			YRC1000TcpNet.<ReadFromCoreServerAsync>d__15 <ReadFromCoreServerAsync>d__ = new YRC1000TcpNet.<ReadFromCoreServerAsync>d__15();
			<ReadFromCoreServerAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult<string>>.Create();
			<ReadFromCoreServerAsync>d__.<>4__this = this;
			<ReadFromCoreServerAsync>d__.socket = socket;
			<ReadFromCoreServerAsync>d__.send = send;
			<ReadFromCoreServerAsync>d__.<>1__state = -1;
			<ReadFromCoreServerAsync>d__.<>t__builder.Start<YRC1000TcpNet.<ReadFromCoreServerAsync>d__15>(ref <ReadFromCoreServerAsync>d__);
			return <ReadFromCoreServerAsync>d__.<>t__builder.Task;
		}

		/// <inheritdoc cref="M:HslCommunication.Robot.YASKAWA.YRC1000TcpNet.ReadByCommand(System.String,System.String)" />
		// Token: 0x06000333 RID: 819 RVA: 0x0000CE14 File Offset: 0x0000B014
		[DebuggerStepThrough]
		public Task<OperateResult<string>> ReadByCommandAsync(string command, string commandData)
		{
			YRC1000TcpNet.<ReadByCommandAsync>d__16 <ReadByCommandAsync>d__ = new YRC1000TcpNet.<ReadByCommandAsync>d__16();
			<ReadByCommandAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult<string>>.Create();
			<ReadByCommandAsync>d__.<>4__this = this;
			<ReadByCommandAsync>d__.command = command;
			<ReadByCommandAsync>d__.commandData = commandData;
			<ReadByCommandAsync>d__.<>1__state = -1;
			<ReadByCommandAsync>d__.<>t__builder.Start<YRC1000TcpNet.<ReadByCommandAsync>d__16>(ref <ReadByCommandAsync>d__);
			return <ReadByCommandAsync>d__.<>t__builder.Task;
		}

		/// <summary>
		/// 读取机器人的报警信息<br />
		/// Read the alarm information of the robot
		/// </summary>
		/// <returns>原始的报警信息</returns>
		// Token: 0x06000334 RID: 820 RVA: 0x0000CE66 File Offset: 0x0000B066
		[HslMqttApi(Description = "Read the alarm information of the robot")]
		public OperateResult<string> ReadRALARM()
		{
			return this.ReadByCommand("RALARM", null);
		}

		/// <summary>
		/// 读取机器人的坐标数据信息<br />
		/// Read the coordinate data information of the robot
		/// </summary>
		/// <returns>原始的报警信息</returns>
		// Token: 0x06000335 RID: 821 RVA: 0x0000CE74 File Offset: 0x0000B074
		[HslMqttApi(Description = "Read the coordinate data information of the robot")]
		public OperateResult<string> ReadRPOSJ()
		{
			return this.ReadByCommand("RPOSJ", null);
		}

		/// <inheritdoc cref="M:HslCommunication.Robot.YASKAWA.YRC1000TcpNet.ReadRALARM" />
		// Token: 0x06000336 RID: 822 RVA: 0x0000CE84 File Offset: 0x0000B084
		[DebuggerStepThrough]
		public Task<OperateResult<string>> ReadRALARMAsync()
		{
			YRC1000TcpNet.<ReadRALARMAsync>d__19 <ReadRALARMAsync>d__ = new YRC1000TcpNet.<ReadRALARMAsync>d__19();
			<ReadRALARMAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult<string>>.Create();
			<ReadRALARMAsync>d__.<>4__this = this;
			<ReadRALARMAsync>d__.<>1__state = -1;
			<ReadRALARMAsync>d__.<>t__builder.Start<YRC1000TcpNet.<ReadRALARMAsync>d__19>(ref <ReadRALARMAsync>d__);
			return <ReadRALARMAsync>d__.<>t__builder.Task;
		}

		/// <inheritdoc cref="M:HslCommunication.Robot.YASKAWA.YRC1000TcpNet.ReadRPOSJ" />
		// Token: 0x06000337 RID: 823 RVA: 0x0000CEC8 File Offset: 0x0000B0C8
		[DebuggerStepThrough]
		public Task<OperateResult<string>> ReadRPOSJAsync()
		{
			YRC1000TcpNet.<ReadRPOSJAsync>d__20 <ReadRPOSJAsync>d__ = new YRC1000TcpNet.<ReadRPOSJAsync>d__20();
			<ReadRPOSJAsync>d__.<>t__builder = AsyncTaskMethodBuilder<OperateResult<string>>.Create();
			<ReadRPOSJAsync>d__.<>4__this = this;
			<ReadRPOSJAsync>d__.<>1__state = -1;
			<ReadRPOSJAsync>d__.<>t__builder.Start<YRC1000TcpNet.<ReadRPOSJAsync>d__20>(ref <ReadRPOSJAsync>d__);
			return <ReadRPOSJAsync>d__.<>t__builder.Task;
		}

		/// <inheritdoc />
		// Token: 0x06000338 RID: 824 RVA: 0x0000CF0C File Offset: 0x0000B10C
		public override string ToString()
		{
			return string.Format("YRC1000TcpNet Robot[{0}:{1}]", this.IpAddress, this.Port);
		}
	}
}
